﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include "OwnerPtr.h"
#include "IJournalData.h"


namespace gcmp
{
    /// \brief 鼠标操作类型
    enum class JournalMouseActionType : int32_t
    {
        MousePress = 0,       ///< 鼠标按下
        MouseRelease = 1,     ///< 鼠标抬起
        MouseDoubleClick = 2, ///< 鼠标双击
        MouseMove = 3,        ///< 鼠标移动
        MouseWheel =4,        ///< 滚轮缩放
        Invalid = 5,          ///< 无效
    };

    /// \brief 鼠标操作的按键类型
    enum class JournalButtonType : int32_t
    {
        Left = 0,   ///< 左键
        Right = 1,  ///< 右键
        Middle = 2, ///< 中键
        Invalid =3, ///< 无效
    };

    /// \brief 日志录制回放数据：三维坐标系下鼠标操作数据
    class GCMP_JOURNAL_INTERFACE_EXPORT IJournalMouseData : public IJournalData
    {
    public:
        /// \brief 析构函数
        virtual ~IJournalMouseData() {}

        /// \brief 创建一个 IJournalMouseData 实例
        ///
        /// \return IJournalMouseData 实例
        static gcmp::OwnerPtr<IJournalMouseData> Create();

        /// \brief 设置鼠标操作的x坐标
        ///
        /// \param[in] x 鼠标操作的x坐标
        /// \return void
        virtual void SetX(double x) = 0;

        /// \brief 获取鼠标操作的x坐标
        ///
        /// \return 鼠标操作的x坐标
        virtual double GetX() const = 0;

        /// \brief 设置鼠标操作的y坐标
        ///
        /// \param[in] y 鼠标操作的y坐标
        /// \return void
        virtual void SetY(double y) = 0;

        /// \brief 获取鼠标操作的y坐标
        ///
        /// \return 鼠标操作的y坐标
        virtual double GetY() const = 0;

        /// \brief 设置鼠标操作的z坐标
        ///
        /// \param[in] z 鼠标操作的z坐标
        /// \return void
        virtual void SetZ(double z) = 0;

        /// \brief 获取鼠标操作的z坐标
        ///
        /// \return 鼠标操作的z坐标
        virtual double GetZ() const = 0;

        /// \brief 设置鼠标滚轮操作的幅度
        ///
        /// \param[in] delta 滚轮操作的幅度
        /// \return void
        virtual void SetDelta(int delta) = 0;

        /// \brief 获取鼠标滚轮操作的幅度
        ///
        /// \return 鼠标滚轮操作的幅度，无滚轮操作则返回0
        virtual int GetDelta() const = 0;

        /// \brief 设置鼠标操作的按键类型
        ///
        /// \param[in] buttonType 鼠标操作的按键类型
        /// \return void
        virtual void SetButtonType(JournalButtonType buttonType) = 0;

        /// \brief 获取鼠标操作的按键类型
        ///
        /// \return 鼠标操作的按键类型
        virtual JournalButtonType GetButtonType() const = 0;

        /// \brief 设置鼠标操作的操作类型
        ///
        /// \param[in] mouseActionType 鼠标操作的操作类型
        /// \return void
        virtual void SetMouseActionType(JournalMouseActionType mouseActionType) = 0;

        /// \brief 获取鼠标操作的操作类型
        ///
        /// \return 鼠标操作的操作类型
        virtual JournalMouseActionType GetMouseActionType() const = 0;
    };
}

